#ifndef _FILTER_H
#define _FILTER_H

#define FILTER_ORDER	15					// Order of low pass filter 
#define KAISER_BETA		10.0				// Beta in Kaiser window

/*
 *Function:
 *		LpFilter
 *Description:
 *		Discrete lowpass filter with Kaiser window (2N-1 in size, here only the right 
 *		wing N coefficients will be kept).
 *Arguments:
 *		coeff:  filter coefficients. float[N]
 *		cutoff: normalized frequency cutoff (cutoff = RealCutFreq/HalfSampleFreq). 
 *				It must be in the range 0 ~ 0.5
 *		N:		The right wing sz plus the central point. WindowSize=(2*N-1).
 *		gain:   filter gain
 *Retval:
 *		non-zero: successful
 *		zero: failed
 *Arthor:
 *		xwu 2005/04/24
 */
extern int LpFilter(float coeff[], float cutoff, int N, float gain = 1.0);

extern int PolyPhaseDecomposition (float coeff[], float coeffp[], int N, int M);
#endif